]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Don't change opacity on destruction
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 24 Sep 2020 18:57:12 +0000 (15:57 -0300)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 5 Oct 2020 12:06:48 +0000 (12:06 +0000)
At the end of BaseAppView._clearAnimateLater(), the '_grid' actor's opacity is
set to 255. As it turns out, _clearAnimateLater() is called, among others, by
vfunc_unmap(). However, unmapping is part of the destruction process, and at
the time it is called, '_grid' is already destroying, which makes GJS complain
about accessing an invalid object.

Don't change opacity on BaseAppView._clearAnimateLater(), and instead move it
to the couple of places outside vfunc_unmap() that call it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447

js/ui/appDisplay.js

index 840d4fd3e0699372fc2a2868f39b8eccf388a930..fa2782d81e56a87a6613410d49d4bdd21dc756f6 100644 (file)
@@ -654,7 +654,6 @@ var BaseAppView = GObject.registerClass({
             this.disconnect(this._viewLoadedHandlerId);
             this._viewLoadedHandlerId = 0;
         }
-        this._grid.opacity = 255;
     }
 
     animate(animationDirection, onComplete) {
@@ -666,6 +665,7 @@ var BaseAppView = GObject.registerClass({
         }
 
         this._clearAnimateLater();
+        this._grid.opacity = 255;
 
         if (animationDirection == IconGrid.AnimationDirection.IN) {
             const doSpringAnimationLater = laterType => {
@@ -684,6 +684,7 @@ var BaseAppView = GObject.registerClass({
                 this._viewLoadedHandlerId = this.connect('view-loaded',
                     () => {
                         this._clearAnimateLater();
+                        this._grid.opacity = 255;
                         doSpringAnimationLater(Meta.LaterType.BEFORE_REDRAW);
                     });
             }